package com.api.signature.auto.spring;

import com.api.signature.auto.config.ApiSignConfig;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Jerry
 * @date 2024-01-23 17:47
 * 注册Api-签名所需要的Bean
 */
@Configuration
public class ApiBeanRegister {


    @Bean
    @ConditionalOnProperty(prefix = "api-signature", name = "enable", havingValue = "true")
    @ConfigurationProperties(prefix = "api-signature")
    public ApiSignConfig apiSignatureConfig() {
        return new ApiSignConfig();
    }

}
